fn factory(x: i32) -> Box<dyn Fn(i32) -> i32> {
    let num = 5;
    if x > 5 {
        Box::new(move |x| x + num)
    } else {
        Box::new(move |x| x - num)
    }
}
fn main(){
    let answer = factory(6)(11);
    assert_eq!(16, answer);
}
